<?php
/**
 * Created by PhpStorm.
 * User: Jiarui
 * Date: 2015/11/12
 * Time: 16:45
 */

namespace Admin\Controller;
use Think\Controller;

class AdminController extends BaseController
{
    public function changePassword(){

        $this->display();

    }

    public function save(){

        $id = $_SESSION['id'];

        $password = I('post.password');

        $model = D('Admin');

        $result = $model->changePassword($id,$password);

        if($result){
            $this->ajaxReturn('success');
        }else{
            $this->ajaxReturn('fail');
        }

    }
}